package com.example.demo;

import com.example.demo.service.MongoDBFileExport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description mongo测试控制器
 * @Author wangzi
 * @Date 2019/4/17 11:23
 */
@RestController
@RequestMapping("/mongo")
public class MongoTestController {

    @Autowired
    MongoDBFileExport mongoDBFileExport;

    @RequestMapping("/ids")
    public Map getIds(){
        List list = mongoDBFileExport.finallyMethod(1);
        Map map = new HashMap<>();
        map.put("list", list);
        map.put("size", list.size());
        return map;
    }


}
